LandAdapter = function(land) {
    this.id = land.getId();
    this.owner = land.getOwner();
    this.type = land.getType();
    this.x = land.getX();
    this.y = land.getY();
    this.width = land.getWidth();
    this.height = land.getHeight();
    this.points = land.getPoints();
}

LandPresenter = new Class({
    initialize: function(model) {
        this.model = model;
        this.view = new LandView();
        this.updatePoints = this.updatePoints.bind(this);
        this.addPoints = this.addPoints.bind(this);
        this.model.addEvent('points: change', this.updatePoints);
        this.view.addEvent('points: add', this.addPoints);
    },
    updatePoints: function() {
        this.view.renderInfo(new LandAdapter(this.model));
    },
    addPoints: function() {
        this.model.addPoints(1);
    }
});

BoardPresenter = new Class({
    initialize: function(model) {
        this.model = model;
        this.view = new BoardView();
        var self = this;
        this.model.getLands().each(function(land) {
            self.addLand(new LandPresenter(land));
        });
    },
    addLand: function(landPresenter) {
        console.log(landPresenter.view);
        landPresenter.view.render(new LandAdapter(landPresenter.model), this.view.width, this.view.height).el.inject(this.view.el);
    }
});